package com.ruoyi.bnt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bnt.mapper.BntSpecialcolumninfoMapper;
import com.ruoyi.bnt.domain.BntSpecialcolumninfo;
import com.ruoyi.bnt.service.IBntSpecialcolumninfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 专栏详情Service业务层处理
 * 
 * @author yyj
 * @date 2020-09-29
 */
@Service
public class BntSpecialcolumninfoServiceImpl implements IBntSpecialcolumninfoService 
{
    @Autowired
    private BntSpecialcolumninfoMapper bntSpecialcolumninfoMapper;

    /**
     * 查询专栏详情
     * 
     * @param id 专栏详情ID
     * @return 专栏详情
     */
    @Override
    public BntSpecialcolumninfo selectBntSpecialcolumninfoById(String id)
    {
        return bntSpecialcolumninfoMapper.selectBntSpecialcolumninfoById(id);
    }

    /**
     * 查询专栏详情列表
     * 
     * @param bntSpecialcolumninfo 专栏详情
     * @return 专栏详情
     */
    @Override
    public List<BntSpecialcolumninfo> selectBntSpecialcolumninfoList(BntSpecialcolumninfo bntSpecialcolumninfo)
    {
        return bntSpecialcolumninfoMapper.selectBntSpecialcolumninfoList(bntSpecialcolumninfo);
    }

    /**
     * 新增专栏详情
     * 
     * @param bntSpecialcolumninfo 专栏详情
     * @return 结果
     */
    @Override
    public int insertBntSpecialcolumninfo(BntSpecialcolumninfo bntSpecialcolumninfo)
    {
        bntSpecialcolumninfo.setCreateTime(DateUtils.getNowDate());
        return bntSpecialcolumninfoMapper.insertBntSpecialcolumninfo(bntSpecialcolumninfo);
    }

    /**
     * 修改专栏详情
     * 
     * @param bntSpecialcolumninfo 专栏详情
     * @return 结果
     */
    @Override
    public int updateBntSpecialcolumninfo(BntSpecialcolumninfo bntSpecialcolumninfo)
    {
        bntSpecialcolumninfo.setUpdateTime(DateUtils.getNowDate());
        return bntSpecialcolumninfoMapper.updateBntSpecialcolumninfo(bntSpecialcolumninfo);
    }

    /**
     * 删除专栏详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBntSpecialcolumninfoByIds(String ids)
    {
        return bntSpecialcolumninfoMapper.deleteBntSpecialcolumninfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除专栏详情信息
     * 
     * @param id 专栏详情ID
     * @return 结果
     */
    @Override
    public int deleteBntSpecialcolumninfoById(String id)
    {
        return bntSpecialcolumninfoMapper.deleteBntSpecialcolumninfoById(id);
    }
}
